import {http} from "..";

//事故四项指数分页接口
export const GetEmergencyPaging = (data = { startTime: "2025-01-01 00:00:00", endTime: "2025-02-10 00:00:00" }) => http.get({ url: "/multipleAnalysis/pageInfo", data: data });
export const ExportAccidentFile = (data) => http.get({  url: "/report/acdDetail", data, responseType: 'blob' });

// 乡镇街道事故统计
export const GetAccidentTownsData = (data = { startTime: "", endTime: "" }) => http.get({ url: "/multipleAnalysis/townStreetTable" ,data});
// 一般程序交通事故四项指标统计
export const GetAccidentFourIndicatorData = (data = { startTime: '2024-01-30 00:00:00', endTime: '2024-12-30 23:59:59' }) => http.get({ url: "/acd4ItemReport", data });

// 一般程序交通事故起数时间折线图（小时）
export const GetLineChartNumByHour = (data = { startTime: "", endTime: "" }) => http.get({ url: "/multipleAnalysis/numByHourLine" ,data});

// 一般程序交通事故起数柱状图（月份）
export const GetBarChartNumByMonth = (data = { startTime: "", endTime: "" }) => http.get({ url: "/multipleAnalysis/numByMonthBar",data });

// 一般程序交通事故死亡人数时间折线图（小时）
export const GetLineChartDeathNumByHour = (data = { startTime: "", endTime: "" }) => http.get({ url: "/multipleAnalysis/deathNumByHourLine" ,data});

// 一般程序交通事故死亡人数柱状图（月份）
export const GetBarChartDeathNumByMonth = (data = { startTime: "", endTime: "" }) => http.get({ url: "/multipleAnalysis/deathNumByMonthBar",data });

// 交通事故道路分布
export const GetAccidentRoadsData = (data = { startTime: "", endTime: "" }) => http.get({ url: "/multipleAnalysis/roadTypeTable", data });

// 交通事故道路分布
export const GetAccidentFrequentlyOccuredRoadsData = (data = { startTime: "", endTime: "" }) => http.get({ url: "/multipleAnalysis/acdTypeXqRoadTable", data });

// 事故形态统计表
export const GetAccidentFormsData = (data = { startTime: "", endTime: "" }) => http.get({ url: "/multipleAnalysis/formTable" ,data});

// 隔离设施情况
export const GetAccidentGlssData = (data = { startTime: "", endTime: "" }) => http.get({ url: "/multipleAnalysis/dlwlglTable" ,data});

// 中央隔离设施
export const GetAccidentZyGlssData = (data = { startTime: "", endTime: "" }) => http.get({ url: "/multipleAnalysis/zyglssTable",data });

// 路侧防护设施
export const GetAccidentFhGlssData = (data = { startTime: "", endTime: "" }) => http.get({ url: "/multipleAnalysis/fhssTable",data });

// 一般程序事故认定原因统计表
export const GetAccidentDeterminationData = (data = { startTime: "2024-01-01 12:00:00", endTime: "2024-12-30 23:59:59" }) => http.get({ url: "/sgrdyyReport", data });

// 环境因素事故数量查询(天气)
export const GetAccidentByTq = (data = { startTime: '2024-01-30 00:00:00', endTime: '2024-12-30 23:59:59' }) => http.get({ url: "/sgrdyyReportTq", data });

// 环境因素事故数量查询(路面)
export const GetAccidentByLmzk = (data = { startTime: '2024-01-30 00:00:00', endTime: '2024-12-30 23:59:59' }) => http.get({ url: "/sgrdyyReportLmzk", data });

// 环境因素事故数量查询(路表)
export const GetAccidentByLbqk = (data = { startTime: '2024-01-30 00:00:00', endTime: '2024-12-30 23:59:59' }) => http.get({ url: "/sgrdyyReportLbqk", data });

// 环境因素事故数量查询(照明)
export const GetAccidentByZmtj = (data = { startTime: '2024-01-30 00:00:00', endTime: '2024-12-30 23:59:59' }) => http.get({ url: "/sgrdyyReportZmtj", data });

// 车辆行驶状态
export const GetDrivingStatusData = (data = { startTime: "2024-01-01 12:00:00", endTime: "2024-12-30 23:59:59" }) => http.get({ url: "/sgyyXsztReport", data });


// 车辆登记、检验状态
export const GetVehicleInspectionData = (data = { startTime: "2024-01-01 12:00:00", endTime: "2024-12-30 23:59:59" }) => http.get({ url: "/sgyyClhfztReport", data });

// 车辆性质
export const GetVehicleTypeData = (data = { startTime: "2024-01-01 12:00:00", endTime: "2024-12-30 23:59:59" }) => http.get({ url: "/sgyyClsyxzReport" , data});


// 交通事故责任者交通方式
export const GetAccidentDriverTransportData = (data = { startTime: "2024-01-01 12:00:00", endTime: "2024-12-30 23:59:59" }) => http.get({ url: "/sgyyJtfsReport/zrr" , data});

// 交通事故责任者驾龄
export const GetAccidentDriverLisenceAgeData = (data = { startTime: "2024-01-01 12:00:00", endTime: "2024-12-30 23:59:59" }) => http.get({ url: "/sgrdyyReportJl", data });

// 交通事故责任者年龄
export const GetAccidentDriverAgetData = (data = { startTime: "2024-01-01 12:00:00", endTime: "2024-12-30 23:59:59" }) => http.get({ url: "/sgyyNlReport/zrr" , data});

// 交通方式伤亡人数统计
export const GetAccidentDeathData = (data = { startTime: "2024-01-01 12:00:00", endTime: "2024-12-30 23:59:59" }) => http.get({ url: "sgyyJtfsReport/sw" , data});

// 伤亡人员职业统计
export const GetAccidentJobData = (data = { startTime: "2024-01-01 12:00:00", endTime: "2024-12-30 23:59:59" }) => http.get({ url: "/sgyyRylxReport" , data});

// 伤亡人员年龄统计
export const GetAccidentAgeData = (data = { startTime: "2024-01-01 12:00:00", endTime: "2024-12-30 23:59:59" }) => http.get({ url: "/sgyyNlReport" , data});



export const GetReportUrl = (data = { startTime: "2024-01-01 12:00:00", endTime: "2024-12-30 23:59:59" }) => http.get({ url: "/report/acdDetail" , data,responseType: 'blob'});
export const GetReportUrlDeathInfo = (data = {}) => http.get({ url: "/report/pageInfo" , data});
export const GetReportUrlDeath = (sgbm = "") => http.get({ url: `/report/deathReport?sgbm=${sgbm}`,responseType: 'blob'});

export const GetHistoricalInvestigationRecords = (data) => http.post<any>({ url: `/heatMap/reportPageInfo`,data:data});


export const GetHistoricalInvestigationRecordsList = (reportId = '') => http.get<any>({ url: `/heatMap/getReport?reportId=${reportId}`});

//人员详情
export const PostPolicePageInfo = (data) => http.post<any>({ url: `/police/pageInfo` ,data: data });